{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "colab": {
      "name": "Titanic.ipynb",
      "version": "0.3.2",
      "provenance": [],
      "collapsed_sections": [
        "wutajrg6TDIU",
        "JVEL2sWCTZoQ",
        "wf4-ZzTvkNOT",
        "CIRSqgCNBCH9",
        "v5Pb03m81iDY",
        "1AxZIiFs3BB6",
        "z9SWwRq9vbHb",
        "6hDImUmGzHQ3",
        "tg5uTkXd4Ljl"
      ],
      "include_colab_link": true
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/824024445/KaggleCases/blob/master/Titanic(%E6%B3%B0%E5%9D%A6%E5%B0%BC%E5%85%8B%E5%8F%B7).ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "iwkTgf9jN1QI",
        "colab_type": "text"
      },
      "source": [
        "# 机器学习经典Kaggle案例[泰坦尼克号：从灾难中学习机器](https://www.kaggle.com/c/titanic)\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "3G1-a7QFSzE_",
        "colab_type": "text"
      },
      "source": [
        "## 一、简介"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "dGO5p8WAS2n7",
        "colab_type": "text"
      },
      "source": [
        "泰坦尼克号案例可以说是kaggle的“hello world”，入门者的必看案例。"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "wutajrg6TDIU",
        "colab_type": "text"
      },
      "source": [
        "### 1.1 比赛描述"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "M3HbRWnDTGHy",
        "colab_type": "text"
      },
      "source": [
        "RMS泰坦尼克号沉没是历史上最臭名昭着的沉船之一。1912年4月15日，在她的处女航中，泰坦尼克号在与冰山相撞后沉没，在2224名乘客和机组人员中造成1502人死亡。这场耸人听闻的悲剧震惊了国际社会，并为船舶制定了更好的安全规定。\n",
        "\n",
        "造成海难失事的原因之一是乘客和机组人员没有足够的救生艇。尽管幸存下沉有一些幸运因素，但有些人比其他人更容易生存，例如妇女，儿童和上流社会。\n",
        "\n",
        "在这个挑战中，我们要求您完成对哪些人可能存活的分析。特别是，我们要求您运用机器学习工具来预测哪些乘客幸免于悲剧"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "JVEL2sWCTZoQ",
        "colab_type": "text"
      },
      "source": [
        "### 1.2 比赛评估"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8KPv1M74Tf-Y",
        "colab_type": "text"
      },
      "source": [
        "**目标**\n",
        "\n",
        "你的工作是预测一名乘客是否能够幸免于泰坦尼克号沉没。\n",
        "对于测试集中的每个，您必须预测变量的0或1值。\n",
        "\n",
        "**度量**\n",
        "\n",
        "您的分数是您正确预测的乘客百分比。这简称为“准确度”\n",
        "\n",
        "**提交文件格式**\n",
        "\n",
        "参考示例提交文件（gender_submission.csv）。"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "VDea5foJkWaO",
        "colab_type": "text"
      },
      "source": [
        "### 1.3 数据描述"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "AwFy4fylkZm2",
        "colab_type": "text"
      },
      "source": [
        "\n",
        "<tbody>\n",
        "<tr><th><b>Variable</b></th><th><b>Definition</b></th><th><b>Key</b></th></tr>\n",
        "<tr>\n",
        "<td>survival</td>\n",
        "<td>生存</td>\n",
        "<td>0 = No, 1 = Yes</td>\n",
        "</tr>\n",
        "<tr>\n",
        "<td>pclass</td>\n",
        "<td>票务舱</td>\n",
        "<td>1 = 1st（上等）, 2 = 2nd（中等）, 3 = 3rd（下等）</td>\n",
        "</tr>\n",
        "<tr>\n",
        "<td>sex</td>\n",
        "<td>性别</td>\n",
        "<td></td>\n",
        "</tr>\n",
        "<tr>\n",
        "<td>Age</td>\n",
        "<td>年龄</td>\n",
        "<td></td>\n",
        "</tr>\n",
        "<tr>\n",
        "<td>sibsp</td>\n",
        "<td>泰坦尼克号上的兄弟姐妹/配偶的人数</td>\n",
        "<td></td>\n",
        "</tr>\n",
        "<tr>\n",
        "<td>parch</td>\n",
        "<td>泰坦尼克号上的父母/孩子的人数</td>\n",
        "<td></td>\n",
        "</tr>\n",
        "<tr>\n",
        "<td>ticket</td>\n",
        "<td>票号</td>\n",
        "<td></td>\n",
        "</tr>\n",
        "<tr>\n",
        "<td>fare</td>\n",
        "<td>乘客花费</td>\n",
        "<td></td>\n",
        "</tr>\n",
        "<tr>\n",
        "<td>cabin</td>\n",
        "<td>客舱号码</td>\n",
        "<td></td>\n",
        "</tr>\n",
        "<tr>\n",
        "<td>embarked</td>\n",
        "<td>登船港口</td>\n",
        "<td>C = Cherbourg, Q = Queenstown, S = Southampton</td>\n",
        "</tr>\n",
        "</tbody>\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ZOV3UbUTl47c",
        "colab_type": "text"
      },
      "source": [
        "其中\n",
        "sibsp：数据集定义这样的家庭关系......  \n",
        "兄弟姐妹=兄弟，姐妹，同父异母的弟弟，义妹  \n",
        "配偶=丈夫，妻子（包二奶和未婚夫被忽略）  \n",
        "\n",
        "parch：将数据集定义这样的家庭关系......  \n",
        "父母=母亲，父亲  \n",
        "孩子=女儿，儿子，继女，继子  \n",
        "有些孩子只带着保姆旅行，因此对他们来说parch = 0"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "wf4-ZzTvkNOT",
        "colab_type": "text"
      },
      "source": [
        "### 1.5 工作流程"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "17_8_gPwmaUk",
        "colab_type": "text"
      },
      "source": [
        "1. 问题或问题的定义。 \n",
        "2. 获取训练和测试数据。 \n",
        "3. 数据清洗，准备，清理数据。 \n",
        "4. 分析，识别模式并探索数据。 \n",
        "5. 建模，预测和解决问题。 \n",
        "6. 可视化，报告和呈现问题解决步骤和最终解决方案。 \n",
        "7. 提供或提交结果。"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "aKOXuq2bnATN",
        "colab_type": "text"
      },
      "source": [
        "## 二、代码\n",
        "话不多少，开始行动吧"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6oaahGuQnCl3",
        "colab_type": "text"
      },
      "source": [
        "### 2.1 获取数据"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "CIRSqgCNBCH9",
        "colab_type": "text"
      },
      "source": [
        "#### 2.1.1 下载数据\n",
        "我写了一个小函数来实现数据的下载，数据全都是官网原版数据，我存到了我的github上。（https://github.com/824024445/KaggleCases）  \n",
        "\n",
        "所有数据都下载到了你当前文件夹下的datasets文件下，每个案例涉及到的数据全部下载到了以该案例命名的文件夹下。  \n",
        "\n",
        "我所有的kaggle案例的博客，下载数据均会使用这个函数，只需要修改前两个常量即可。\n",
        "> 注：此函数只用于下载数据，函数在该代码框内就运行了。不再用到其它代码中，包括常量，也不会用在其他地方。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "2akxrpb4pECY",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "import os\n",
        "import zipfile\n",
        "from six.moves import urllib\n",
        "\n",
        "FILE_NAME = \"titanic.zip\" #文件名\n",
        "DATA_PATH =\"datasets/titanic\" #存储文件的文件夹，取跟文件相同（相近）的名字便于区分\n",
        "DATA_URL = \"https://github.com/824024445/KaggleCases/blob/master/datasets/\" + FILE_NAME + \"?raw=true\"\n",
        "\n",
        "\n",
        "def fetch_data(data_url=DATA_URL, data_path=DATA_PATH, file_name=FILE_NAME):\n",
        "    if not os.path.isdir(data_path): #查看当前文件夹下是否存在\"datasets/titanic\"，没有的话创建\n",
        "        os.makedirs(data_path)\n",
        "    zip_path = os.path.join(data_path, file_name) #下载到本地的文件的路径及名称\n",
        "    # urlretrieve()方法直接将远程数据下载到本地\n",
        "    urllib.request.urlretrieve(data_url, zip_path) #第二个参数zip_path是保存到的本地路径\n",
        "    data_zip = zipfile.ZipFile(zip_path)\n",
        "    data_zip.extractall(path=data_path) #什么参数都不输入就是默认解压到当前文件,为了保持统一，是泰坦尼克的数据就全部存到titanic文件夹下\n",
        "    data_zip.close()\n",
        "fetch_data()"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "h9jtYki6BEwB",
        "colab_type": "text"
      },
      "source": [
        "#### 2.1.2 读取数据"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "_NxbkH0yA9SF",
        "colab_type": "code",
        "outputId": "640d1469-df83-4845-c7e8-60a2d68271cc",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 275
        }
      },
      "source": [
        "import pandas as pd\n",
        "import numpy as np\n",
        "\n",
        "train_df = pd.read_csv(\"datasets/titanic/train.csv\")\n",
        "test_df = pd.read_csv(\"datasets/titanic/test.csv\")\n",
        "combine = [train_df, test_df]\n",
        "train_df.head()"
      ],
      "execution_count": 142,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>PassengerId</th>\n",
              "      <th>Survived</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Name</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Age</th>\n",
              "      <th>SibSp</th>\n",
              "      <th>Parch</th>\n",
              "      <th>Ticket</th>\n",
              "      <th>Fare</th>\n",
              "      <th>Cabin</th>\n",
              "      <th>Embarked</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>Braund, Mr. Owen Harris</td>\n",
              "      <td>male</td>\n",
              "      <td>22.0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>A/5 21171</td>\n",
              "      <td>7.2500</td>\n",
              "      <td>NaN</td>\n",
              "      <td>S</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>Cumings, Mrs. John Bradley (Florence Briggs Th...</td>\n",
              "      <td>female</td>\n",
              "      <td>38.0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>PC 17599</td>\n",
              "      <td>71.2833</td>\n",
              "      <td>C85</td>\n",
              "      <td>C</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>Heikkinen, Miss. Laina</td>\n",
              "      <td>female</td>\n",
              "      <td>26.0</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>STON/O2. 3101282</td>\n",
              "      <td>7.9250</td>\n",
              "      <td>NaN</td>\n",
              "      <td>S</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>4</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>Futrelle, Mrs. Jacques Heath (Lily May Peel)</td>\n",
              "      <td>female</td>\n",
              "      <td>35.0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>113803</td>\n",
              "      <td>53.1000</td>\n",
              "      <td>C123</td>\n",
              "      <td>S</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>5</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>Allen, Mr. William Henry</td>\n",
              "      <td>male</td>\n",
              "      <td>35.0</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>373450</td>\n",
              "      <td>8.0500</td>\n",
              "      <td>NaN</td>\n",
              "      <td>S</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   PassengerId  Survived  Pclass  ...     Fare Cabin  Embarked\n",
              "0            1         0       3  ...   7.2500   NaN         S\n",
              "1            2         1       1  ...  71.2833   C85         C\n",
              "2            3         1       3  ...   7.9250   NaN         S\n",
              "3            4         1       1  ...  53.1000  C123         S\n",
              "4            5         0       3  ...   8.0500   NaN         S\n",
              "\n",
              "[5 rows x 12 columns]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 142
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "7-VoBCFnK_5N",
        "colab_type": "text"
      },
      "source": [
        "### 2.2 通过描述数据进行分析\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "a-CeoEQVQX04",
        "colab_type": "text"
      },
      "source": [
        "#### 2.2.1 直接观察+info()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "YrDv131eQtyC",
        "colab_type": "text"
      },
      "source": [
        "首先，通过观察数据(**直接观察+info()**)，可知一些基本信息：\n",
        "- 哪些特征是**类目**？是基于名称、序数、比值还是区间？Survived, Sex, Embarked， Pclass（序数）\n",
        "- 哪些特征是**数字**？是连续的、离散的还是基于时间序列的？连续值：Age, Fare.离散值：SibSp, Parch\n",
        "- 哪些特征是**混合型数据**？Ticket，Cabin\n",
        "- 哪些特征可能包含**拼写错误**或者其它错误？Name\n",
        "- 哪些特征可能包含**空值、null或者空格**？Cabin > Age > Embarked关于null，Cabin > Age 关于空值\n",
        "- 各个特征的**数据类型**是什么？七个特征是整数或浮点数，五个特征是字符串"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "bM-XMNzqLWPv",
        "colab_type": "code",
        "outputId": "d77f2acf-023e-413a-b595-96e31f4416aa",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 645
        }
      },
      "source": [
        "train_df.info()\n",
        "print('_'*40)\n",
        "test_df.info()"
      ],
      "execution_count": 143,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "<class 'pandas.core.frame.DataFrame'>\n",
            "RangeIndex: 891 entries, 0 to 890\n",
            "Data columns (total 12 columns):\n",
            "PassengerId    891 non-null int64\n",
            "Survived       891 non-null int64\n",
            "Pclass         891 non-null int64\n",
            "Name           891 non-null object\n",
            "Sex            891 non-null object\n",
            "Age            714 non-null float64\n",
            "SibSp          891 non-null int64\n",
            "Parch          891 non-null int64\n",
            "Ticket         891 non-null object\n",
            "Fare           891 non-null float64\n",
            "Cabin          204 non-null object\n",
            "Embarked       889 non-null object\n",
            "dtypes: float64(2), int64(5), object(5)\n",
            "memory usage: 83.6+ KB\n",
            "________________________________________\n",
            "<class 'pandas.core.frame.DataFrame'>\n",
            "RangeIndex: 418 entries, 0 to 417\n",
            "Data columns (total 11 columns):\n",
            "PassengerId    418 non-null int64\n",
            "Pclass         418 non-null int64\n",
            "Name           418 non-null object\n",
            "Sex            418 non-null object\n",
            "Age            332 non-null float64\n",
            "SibSp          418 non-null int64\n",
            "Parch          418 non-null int64\n",
            "Ticket         418 non-null object\n",
            "Fare           417 non-null float64\n",
            "Cabin          91 non-null object\n",
            "Embarked       418 non-null object\n",
            "dtypes: float64(2), int64(4), object(5)\n",
            "memory usage: 36.0+ KB\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "193J7IWdQjPl",
        "colab_type": "text"
      },
      "source": [
        "#### 2.2.2 describe()针对数值型数据"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "fu6vNHesQxSU",
        "colab_type": "text"
      },
      "source": [
        "因为数值型数据有很多数学特征，所以专门针对数值型数据进行观察，可以观察的有：**计数、平均值、标准差、四分位、最大值、最小值**等等。本例可观察到的信息有：\n",
        "- 总共891个样本，占总样本数(2224)的40%\n",
        "- 存活是一个取值0和1的类目特征，大概有38%的人存活了下来（实际存活率是32%）\n",
        "- 年龄在65-80岁之间的老年乘客（<1％）很少\n",
        "- 大约30%的乘客有兄弟姐妹或者配偶。（sibsp观察50%分位）\n",
        "- 大多数乘客(>75%)没有和父母和孩子一起旅行。（parch观察75%分位）\n",
        "- 很少有乘客（<1％）能够支付高达512美元的票价\n",
        "\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "fRzfVkiUN1Q6",
        "colab_type": "code",
        "outputId": "20e8fa1d-2302-4ab4-dc58-441f1e13c7b9",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 300
        }
      },
      "source": [
        "train_df.describe()"
      ],
      "execution_count": 144,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>PassengerId</th>\n",
              "      <th>Survived</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Age</th>\n",
              "      <th>SibSp</th>\n",
              "      <th>Parch</th>\n",
              "      <th>Fare</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>count</th>\n",
              "      <td>891.000000</td>\n",
              "      <td>891.000000</td>\n",
              "      <td>891.000000</td>\n",
              "      <td>714.000000</td>\n",
              "      <td>891.000000</td>\n",
              "      <td>891.000000</td>\n",
              "      <td>891.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>mean</th>\n",
              "      <td>446.000000</td>\n",
              "      <td>0.383838</td>\n",
              "      <td>2.308642</td>\n",
              "      <td>29.699118</td>\n",
              "      <td>0.523008</td>\n",
              "      <td>0.381594</td>\n",
              "      <td>32.204208</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>std</th>\n",
              "      <td>257.353842</td>\n",
              "      <td>0.486592</td>\n",
              "      <td>0.836071</td>\n",
              "      <td>14.526497</td>\n",
              "      <td>1.102743</td>\n",
              "      <td>0.806057</td>\n",
              "      <td>49.693429</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>min</th>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.420000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>25%</th>\n",
              "      <td>223.500000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>2.000000</td>\n",
              "      <td>20.125000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>7.910400</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>50%</th>\n",
              "      <td>446.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>3.000000</td>\n",
              "      <td>28.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>14.454200</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>75%</th>\n",
              "      <td>668.500000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>3.000000</td>\n",
              "      <td>38.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>0.000000</td>\n",
              "      <td>31.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>max</th>\n",
              "      <td>891.000000</td>\n",
              "      <td>1.000000</td>\n",
              "      <td>3.000000</td>\n",
              "      <td>80.000000</td>\n",
              "      <td>8.000000</td>\n",
              "      <td>6.000000</td>\n",
              "      <td>512.329200</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "       PassengerId    Survived      Pclass  ...       SibSp       Parch        Fare\n",
              "count   891.000000  891.000000  891.000000  ...  891.000000  891.000000  891.000000\n",
              "mean    446.000000    0.383838    2.308642  ...    0.523008    0.381594   32.204208\n",
              "std     257.353842    0.486592    0.836071  ...    1.102743    0.806057   49.693429\n",
              "min       1.000000    0.000000    1.000000  ...    0.000000    0.000000    0.000000\n",
              "25%     223.500000    0.000000    2.000000  ...    0.000000    0.000000    7.910400\n",
              "50%     446.000000    0.000000    3.000000  ...    0.000000    0.000000   14.454200\n",
              "75%     668.500000    1.000000    3.000000  ...    1.000000    0.000000   31.000000\n",
              "max     891.000000    1.000000    3.000000  ...    8.000000    6.000000  512.329200\n",
              "\n",
              "[8 rows x 7 columns]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 144
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "iqTgJFE3UsOY",
        "colab_type": "text"
      },
      "source": [
        "#### 2.2.3 describe(include=['O'])针对类目特征"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "87TsJhntUzrN",
        "colab_type": "text"
      },
      "source": [
        "能够观察到一下信息：\n",
        "- 名称在整个数据集中是唯一的（count = unique = 891）\n",
        "- 性别中男性比较多577\n",
        "- 票号有22%重复的值\n",
        "- 客舱有几种，有四个人住同一间的\n",
        "- 大多数人从S港上船"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "XuaKvAkPU0EV",
        "colab_type": "code",
        "outputId": "e501b28f-a818-479e-8410-ece8760d450b",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 175
        }
      },
      "source": [
        "train_df.describe(include=['O'])"
      ],
      "execution_count": 145,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Name</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Ticket</th>\n",
              "      <th>Cabin</th>\n",
              "      <th>Embarked</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>count</th>\n",
              "      <td>891</td>\n",
              "      <td>891</td>\n",
              "      <td>891</td>\n",
              "      <td>204</td>\n",
              "      <td>889</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>unique</th>\n",
              "      <td>891</td>\n",
              "      <td>2</td>\n",
              "      <td>681</td>\n",
              "      <td>147</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>top</th>\n",
              "      <td>Smith, Mr. James Clinch</td>\n",
              "      <td>male</td>\n",
              "      <td>347082</td>\n",
              "      <td>B96 B98</td>\n",
              "      <td>S</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>freq</th>\n",
              "      <td>1</td>\n",
              "      <td>577</td>\n",
              "      <td>7</td>\n",
              "      <td>4</td>\n",
              "      <td>644</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "                           Name   Sex  Ticket    Cabin Embarked\n",
              "count                       891   891     891      204      889\n",
              "unique                      891     2     681      147        3\n",
              "top     Smith, Mr. James Clinch  male  347082  B96 B98        S\n",
              "freq                          1   577       7        4      644"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 145
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "T02fNNMZXEVc",
        "colab_type": "text"
      },
      "source": [
        "#### 2.2.4 matplotlib观察各特征之间的关系"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "GUpI0zNRYZn7",
        "colab_type": "text"
      },
      "source": [
        "这个只是查看数值型数据的数量分布，在本例中跟上面得到的结论有些重复。比如能看出各年龄层的分布、花费的分布、带配偶的分布。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "bJyxGovJXWeS",
        "colab_type": "code",
        "outputId": "bec18be7-6d22-4c94-945b-775324beb732",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 792
        }
      },
      "source": [
        "%matplotlib inline\n",
        "import matplotlib.pyplot as plt\n",
        "\n",
        "train_df.hist(figsize=(15,10))"
      ],
      "execution_count": 146,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "array([[<matplotlib.axes._subplots.AxesSubplot object at 0x7ffa1c684f98>,\n",
              "        <matplotlib.axes._subplots.AxesSubplot object at 0x7ffa1c69ca90>,\n",
              "        <matplotlib.axes._subplots.AxesSubplot object at 0x7ffa1c644cf8>],\n",
              "       [<matplotlib.axes._subplots.AxesSubplot object at 0x7ffa1c66af60>,\n",
              "        <matplotlib.axes._subplots.AxesSubplot object at 0x7ffa1c61d208>,\n",
              "        <matplotlib.axes._subplots.AxesSubplot object at 0x7ffa1c5c6470>],\n",
              "       [<matplotlib.axes._subplots.AxesSubplot object at 0x7ffa1c5ed7b8>,\n",
              "        <matplotlib.axes._subplots.AxesSubplot object at 0x7ffa1c595d68>,\n",
              "        <matplotlib.axes._subplots.AxesSubplot object at 0x7ffa1c595da0>]],\n",
              "      dtype=object)"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 146
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAA3AAAAJOCAYAAAD27e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m+hyVJkjSLRvI9cPpuSV4PrAb+\nzWxnGS/JU4DfAS6e5Sh9LGRwu98aBlczP5XktKp6eFZTTewCYHNVvTvJS4GPJDm1qr4z28EkSZLU\nprl6BW4vsGLM/PJu2YRtkixkcIvaV2ck3QQZOhPlJMmPAf8JOK+qvjlD2caaLOczgVOB7UnuBc4C\nts3CQCZ99uceYFtV/XNV/T3wtwwKupnWJ+slwDUAVfVXwNOBpTOSrr9e72FJkiTNDXO1gPs0sCrJ\nyUmOYzAAxLZxbbYBF3XTrwE+WTP/reST5kzyIuD3GRRvs/V5raPmrKoDVbW0qlZW1UoGn9U7r6p2\nzKWcnT9lcPWNJEsZ3FJ5z0yG7PTJ+iXgbIAk/5JBAfflGU05uW3AG7rRKM8CDlTVA7MdSpIkSROb\nk7dQVtWhJG8GPgEsAK6sqjuT/Cawo6q2AVcwuCVtN4NBGs6fozl/G1gE/GE3xsqXquq8OZhz1vXM\n+QnglUnuAr4N/EpVzfSV175Z3wZ8MMlbGQxocvFM/ydDko8yKHiXdp/Feyfw1K4PH2Dw2bxzgd3A\nI8AbZzKfJEmSpiYzf9FKkiRJkvRkzNVbKCVJkiRJ41jASZIkSVIjLOAkSZIkqREWcJIkSZLUCAs4\nSZIkSWqEBZwkSZIkNcICTpIkSZIa8f8BcouGzrGscNkAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 1080x720 with 9 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "a_KJlVIiYxhj",
        "colab_type": "text"
      },
      "source": [
        "#### 2.2.5 基于初始阶段数据分析的假设"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "uzLVIjsIY59h",
        "colab_type": "text"
      },
      "source": [
        "进行上面的分析，我们主要是想做的事情有：\n",
        "- 了解相关性：我们想知道每个特征与生存的相关性\n",
        "- 纠正删除特征：一些特性可能需要删除：ticket（票号）重复值太多（22%），而且它与是否生存之间没有相关性；cabin（船舱）有太多的缺失值；PassengerId更是没有什么用处；Name不仅难处理，更没什么用处；\n",
        "- 创建新特征：有些特征本身与目标值相关性很低，但是可以通过组合创建新的特征来表现出很好的相关性：综合Parch和SibSp可以获得家庭成员的总数；将年龄划分成年龄段新特征；票价划分成区间新特征；\n",
        "- 做出假设：\n",
        "  - 假设1：女人更可能生存\n",
        "  - 假设2：孩子(Age<?)更可能生存\n",
        "  - 假设3：上层乘客(Pclass=1)更有可能生存\n",
        "下一小节，寻找需要创建的新特征，以及对假设进行验证\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "gRO7wWqWbU2-",
        "colab_type": "text"
      },
      "source": [
        "#### 2.2.6 验证假设"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "bPonXtLabahE",
        "colab_type": "text"
      },
      "source": [
        "将性别、年龄、阶层、家庭成员单拎出来查看生存情况"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "zErO7bWyb2I1",
        "colab_type": "code",
        "outputId": "e0239d41-4449-4848-c932-a30d06e74585",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 143
        }
      },
      "source": [
        "#Pclass 查看阶层与生存的关系\n",
        "train_df[['Pclass', 'Survived']].groupby(['Pclass'], as_index=False).mean().sort_values(by='Survived', ascending=False)\n",
        "#阶层越高生存率越高（验证了假设3）"
      ],
      "execution_count": 147,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Survived</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>1</td>\n",
              "      <td>0.629630</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>2</td>\n",
              "      <td>0.472826</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>3</td>\n",
              "      <td>0.242363</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   Pclass  Survived\n",
              "0       1  0.629630\n",
              "1       2  0.472826\n",
              "2       3  0.242363"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 147
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "uivHiYYCglL4",
        "colab_type": "code",
        "outputId": "43dba232-4cbe-4c00-f67d-d20ecad2fb63",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 112
        }
      },
      "source": [
        "#Sex 性别与生存的关系\n",
        "train_df[[\"Sex\", \"Survived\"]].groupby(['Sex'], as_index=False).mean().sort_values(by='Survived', ascending=False)\n",
        "#女性生存率很高（验证了假设1）"
      ],
      "execution_count": 148,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Sex</th>\n",
              "      <th>Survived</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>female</td>\n",
              "      <td>0.742038</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>male</td>\n",
              "      <td>0.188908</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "      Sex  Survived\n",
              "0  female  0.742038\n",
              "1    male  0.188908"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 148
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "la14bLqwgowZ",
        "colab_type": "code",
        "outputId": "c56c3c00-be5b-4c32-cd59-054a768b73a6",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        }
      },
      "source": [
        "#SibSp 兄弟姐妹、配偶与生存的关系\n",
        "train_df[[\"SibSp\", \"Survived\"]].groupby(['SibSp'], as_index=False).mean().sort_values(by='Survived', ascending=False)\n",
        "#兄弟姐妹配偶在1--2人时存活率高于孤身一人，超过2人则低于孤身一人"
      ],
      "execution_count": 149,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>SibSp</th>\n",
              "      <th>Survived</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1</td>\n",
              "      <td>0.535885</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>2</td>\n",
              "      <td>0.464286</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>0.345395</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>3</td>\n",
              "      <td>0.250000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>4</td>\n",
              "      <td>0.166667</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>5</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>8</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   SibSp  Survived\n",
              "1      1  0.535885\n",
              "2      2  0.464286\n",
              "0      0  0.345395\n",
              "3      3  0.250000\n",
              "4      4  0.166667\n",
              "5      5  0.000000\n",
              "6      8  0.000000"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 149
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "JTzvW6XogwEr",
        "colab_type": "code",
        "outputId": "02959e95-1cad-40c2-a617-9cc5381172d3",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        }
      },
      "source": [
        "#Parch 父母、孩子与生存的关系\n",
        "train_df[[\"Parch\", \"Survived\"]].groupby(['Parch'], as_index=False).mean().sort_values(by='Survived', ascending=False)\n",
        "#同行的父母孩子三个或者一个或者两个的时候，生存率高于孤身一人。高于3人则负相关。"
      ],
      "execution_count": 150,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Parch</th>\n",
              "      <th>Survived</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>3</td>\n",
              "      <td>0.600000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1</td>\n",
              "      <td>0.550847</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>2</td>\n",
              "      <td>0.500000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>0.343658</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>5</td>\n",
              "      <td>0.200000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>4</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>6</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   Parch  Survived\n",
              "3      3  0.600000\n",
              "1      1  0.550847\n",
              "2      2  0.500000\n",
              "0      0  0.343658\n",
              "5      5  0.200000\n",
              "4      4  0.000000\n",
              "6      6  0.000000"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 150
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Qaq3QPXXFqGw",
        "colab_type": "text"
      },
      "source": [
        "**通过可视化数据进行分析**：像age这种数据，最好是分段查看，但是贸然分段也不是很明智，这种数据可以使用直方图进行查看。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ZyF1wFPfFowt",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 243
        },
        "outputId": "35503a4f-d00d-4b12-e215-a8d913599f08"
      },
      "source": [
        "#age 年龄与生存的关系\n",
        "import seaborn as sns\n",
        "\n",
        "g = sns.FacetGrid(train_df, col='Survived') #col:跨列共享y轴\"survived\"，row参数是跨行共享x轴\n",
        "g.map(plt.hist, 'Age', bins=20) #bins是指每个图柱子的个数"
      ],
      "execution_count": 151,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "<seaborn.axisgrid.FacetGrid at 0x7ffa1c4df2e8>"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 151
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAADQCAYAAABStPXYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAEWlJREFUeJzt3X+s3XV9x/HnS8qPDRxQvOk6wJUN\nAkEdIB2CqNsAt6pEyKwMwkxNujRLcMOp0TL/mGZugWRRyRxmjTg75rSIMhpcROTHpsahRRH5oYII\nUga0IKCYRS2+98f5Vq/0tvfc3nN6Puee5yM5Od+f57zvt/fd9/l8zud+vqkqJElqzXNGHYAkSTOx\nQEmSmmSBkiQ1yQIlSWqSBUqS1CQLlCSpSRaoIUvyziR3Jrk9yW1JXjKg131tkrUDeq2nB/Aa+ybZ\nkOTeJLckWTb/yDQpJihPXpHkq0m2JVk5iLgWskWjDmAhS3IKcCbw4qr6cZLnAfvM4fxFVbVtpn1V\ntRHYOJhIB2I18ERVHZnkXOAS4E9GHJPGwITlyfeANwJvG3EcY8EW1HAtBR6rqh8DVNVjVfW/AEnu\n7xKRJMuT3NwtvyvJFUm+CFyR5H+SvGD7Cya5uTv+jUk+kOTAJA8keU63f/8kDybZO8lvJ/lMkluT\nfD7JMd0xRyT5UpJvJHnPgH7Ws4D13fJVwOlJMqDX1sI2MXlSVfdX1e3AzwbxegudBWq4PgscnuTb\n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6c02/dI9F640EubJGHM28wUoyQFV9XSSQ+hNeX9q9e4vI6ljnrTP76AWpmuTHATsA/yt\nSSfNyDxpnC0oSVKT/A5KktQkC5QkqUkWKElSkyxQkqQmWaAkSU36f1L9Y6pVOfMFAAAAAElFTkSu\nQmCC\n",
            "text/plain": [
              "<Figure size 432x216 with 2 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "7nY1jBQQK0eO",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 560
        },
        "outputId": "ed3ef764-3f1f-45d4-efb5-b202b2f21f17"
      },
      "source": [
        "#age&Pclass 不同阶层不同年龄与生存的关系。将年龄和阶层进一步划分\n",
        "grid = sns.FacetGrid(train_df, col=\"Survived\", row=\"Pclass\", size=2.2, aspect=1.6) #size:图形大小 aspect：图形的纵横比\n",
        "grid.map(plt.hist, \"Age\", alpha=.5, bins=20)\n",
        "grid.add_legend()"
      ],
      "execution_count": 152,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.6/dist-packages/seaborn/axisgrid.py:230: UserWarning: The `size` paramter has been renamed to `height`; please update your code.\n",
            "  warnings.warn(msg, UserWarning)\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "<seaborn.axisgrid.FacetGrid at 0x7ffa1c289c50>"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 152
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAHUCAYAAABMP5BeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3X+0ZHV55/v3J90QUcwgckI6NAwY\nUNMwA0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mjmvwA4AljXOXU1i+hcxlLS8DCn\nNS0LAAGQZF86Vwj7N0mKTvIX8IXpVgHuqqqXzlOIkmbBnNZM3AWgXU4BPl1V/7qqDq6qA4FvAd8D\n/n2z33B/OhcSAbgbmEjyxPBhksMXInBJUzKn9bQsALTLqTz1m8HlwC/Qufb2JuD/Bb4B/K+q+hGd\nD5jzkmykc6W0l81fuJJmYE7raXk1QM0oyd5V9ViS59K5NOVx1bket6QRZE4LPAZA3bk6yT7AnsCf\n+EEhjTxzWo4ASJLURh4DIElSC1kASJLUQhYAkiS1kAWAJEktZAEgSVILWQBIktRC/z9MmEy/f/iY\noQAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 514.88x475.2 with 6 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ZAFSjv4DQT4w",
        "colab_type": "text"
      },
      "source": [
        "图形的很坐标均是age，第一个图的纵坐标是阶层为1没有生存的人数，第二个图的纵坐标是阶层为1生存的人数。等等。  \n",
        "\n",
        "观察到：\n",
        "- 阶层3的人最多，但是死亡的人数也最多（验证了假设3）\n",
        "- 阶层2和阶层3的婴儿生存率较高（验证了假设2）"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "3xKc4ExBRl5X",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 634
        },
        "outputId": "686d4a86-547e-4584-8ab3-010d9c314d5f"
      },
      "source": [
        "#将类目特征和目标值关联\n",
        "grid = sns.FacetGrid(train_df, row='Embarked', size=2.2, aspect=1.6)\n",
        "grid.map(sns.pointplot, 'Pclass', 'Survived', 'Sex', palette='deep')\n",
        "grid.add_legend()"
      ],
      "execution_count": 153,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.6/dist-packages/seaborn/axisgrid.py:230: UserWarning: The `size` paramter has been renamed to `height`; please update your code.\n",
            "  warnings.warn(msg, UserWarning)\n",
            "/usr/local/lib/python3.6/dist-packages/seaborn/axisgrid.py:715: UserWarning: Using the pointplot function without specifying `order` is likely to produce an incorrect plot.\n",
            "  warnings.warn(warning)\n",
            "/usr/local/lib/python3.6/dist-packages/seaborn/axisgrid.py:720: UserWarning: Using the pointplot function without specifying `hue_order` is likely to produce an incorrect plot.\n",
            "  warnings.warn(warning)\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "<seaborn.axisgrid.FacetGrid at 0x7ffa1c112b38>"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 153
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAATsAAAHUCAYAAABFzo+QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzs3Xl8VPXV+PHPmcm+kBDCEjZZRAEB\nQVHBumClila0fdyqtmpti7Zqn+ep/bVYtbYu1baPbW2tCq2KS92pFfd9RVA2AZF9kyWQDULIPjPn\n98e9CZOQ5SZkMpPMeb9e80rufgbx8L33+73nK6qKMcZ0d75oB2CMMZ3Bkp0xJi5YsjPGxAVLdsaY\nuGDJzhgTFyzZGWPigiW7LkpEgiLyedhnZhuOnSIiLx/i9d8XkYntPPaQr++e5xwRWSYiy0XkSxG5\n+lDPabqvhGgHYNqtUlXHR+PCIuKPxnUbxZAIzAaOV9XtIpIMDIluVCaWWcuumxGRLSJyl9vaWywi\nx4jIGyKyUUSuCdu1h4i8IiJrReRBEfG5xz/gHrdKRH7b6Ly/F5GlwIVh630iMkdE7nCXzxCRBSKy\nVESeE5EMd/00EVnjHv9fHfBVM3H+sS4GUNVqVV3bAec13ZQlu64rtdFt7MVh275yW30fAXOAC4BJ\nwG/D9jkeuB4YDQznQAK6SVU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i8istmdu+3B3huKyPUiUuGuf/TAFaGIfMy9StwkIs+5y05x54Hb6B5z\nUkLPyqQs61RsDhKRJlXNE5F0nPGufwOeA/4MnKOqNSJSoqq1InIr0KSq/yUio1R1v3uM7wD7VPVu\nEdkCzFPVPSJSpKr1InI3sEZVfycimUBIVVsDOWGTUuzKzsQKu1MWVQLv4Ix7vRD4g6rWAKhqX3P3\nTROR593kdjVwirv8ReDXInI9EHKXvQR8Q0S+Boy3RGcSJT3oAExSaXWnLDrIGesf169xZijeJCLX\nAucDqOpnReQsYAGwTkRmqOpDIrLWXfaEiNyoqiuH8ByM6ZNd2Zl4VgIfE5FRACJS0sc2+cBed7qn\nqw8sFJEJqrpWVb8NVANjReREYIeq/gx4DDjN9zMwBruyM3Go6qsiciewSkSiwAbg2l6bfQtnhuJq\n9zXfXf4D9wGEACuATcDXgE+KSCfwHvBd30/CGOwBhTEmRVgz1hiTEizZGWNSgiU7Y0xKsGRnjEkJ\nluyMMSnBkp0xJiVYsjPGpARLdsaYlPD/AfeDEru0V6AAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 323.94x475.2 with 3 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "DWX1yHqIcK2Z",
        "colab_type": "text"
      },
      "source": [
        "观察到：\n",
        "- 女性具有更好的生存率。但是在登陆港口为C的时候是个例外，在该港口登录的人中，男性具有更高的生存率，这可能是Pclas和Embarked之间的相关性。"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "YJYoSkCctTrJ",
        "colab_type": "text"
      },
      "source": [
        "### 2.3数据清洗"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "v5Pb03m81iDY",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.1 删除数据"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "QgpTJQid1p89",
        "colab_type": "text"
      },
      "source": [
        "根据我们之前的假设，Cabin、Ticket、passengerid，name用处可能不大。  \n",
        "首先我们先删除Cabin，Ticket这两个数据质量差的特征。注意要对训练集和测试集执行相同的操作"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "oyjhJhGV14HD",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 54
        },
        "outputId": "5cde04a1-cb8a-4efa-b64d-2190013f579a"
      },
      "source": [
        "print(\"Before\", train_df.shape, test_df.shape, combine[0].shape, combine[1].shape)\n",
        "\n",
        "train_df = train_df.drop([\"Ticket\", \"Cabin\"], axis=1)\n",
        "test_df = test_df.drop([\"Ticket\", \"Cabin\"], axis=1)\n",
        "combine = [train_df, test_df]\n",
        "\n",
        "print(\"After\", train_df.shape, test_df.shape, combine[0].shape, combine[1].shape)"
      ],
      "execution_count": 154,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Before (891, 12) (418, 11) (891, 12) (418, 11)\n",
            "After (891, 10) (418, 9) (891, 10) (418, 9)\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "1AxZIiFs3BB6",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.2 从已有特征中提取新特征\n",
        "对于passengerid，name。其数据质量不差，所以先测试一下这两者与生存之间的相关性再决定是否删除。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "2LXCgOn93Fur",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 614
        },
        "outputId": "68def469-e687-49d9-bc56-ff64b773cd3c"
      },
      "source": [
        "for dataset in combine:\n",
        "    dataset['Title'] = dataset.Name.str.extract(' ([A-Za-z]+)\\.', expand=False)\n",
        "\n",
        "pd.crosstab(train_df['Title'], train_df['Sex']) ##交叉表(crossTab)，交叉表是用于统计分组频率的特殊透视表"
      ],
      "execution_count": 155,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th>Sex</th>\n",
              "      <th>female</th>\n",
              "      <th>male</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Title</th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>Capt</th>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Col</th>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Countess</th>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Don</th>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Dr</th>\n",
              "      <td>1</td>\n",
              "      <td>6</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Jonkheer</th>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Lady</th>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Major</th>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Master</th>\n",
              "      <td>0</td>\n",
              "      <td>40</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Miss</th>\n",
              "      <td>182</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Mlle</th>\n",
              "      <td>2</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Mme</th>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Mr</th>\n",
              "      <td>0</td>\n",
              "      <td>517</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Mrs</th>\n",
              "      <td>125</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Ms</th>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Rev</th>\n",
              "      <td>0</td>\n",
              "      <td>6</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Sir</th>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "Sex       female  male\n",
              "Title                 \n",
              "Capt           0     1\n",
              "Col            0     2\n",
              "Countess       1     0\n",
              "Don            0     1\n",
              "Dr             1     6\n",
              "Jonkheer       0     1\n",
              "Lady           1     0\n",
              "Major          0     2\n",
              "Master         0    40\n",
              "Miss         182     0\n",
              "Mlle           2     0\n",
              "Mme            1     0\n",
              "Mr             0   517\n",
              "Mrs          125     0\n",
              "Ms             1     0\n",
              "Rev            0     6\n",
              "Sir            0     1"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 155
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "GxdPCxdTTbBd",
        "colab_type": "text"
      },
      "source": [
        "对于上面title的结果，可以看出master，mr，mrrs，miss占了绝大部分，我们可以吧一些数量很少的title合并成一个，rare.其余意思是一样的title（不明白，可能得需要对国外姓氏比较了解吧）"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "pJU3WNWDTt_n",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "3da6141e-ff37-43da-985e-e5e8d7e7bd93"
      },
      "source": [
        "for dataset in combine:\n",
        "  dataset[\"Title\"] = dataset[\"Title\"].replace(['Lady', 'Countess','Capt', 'Col',\\\n",
        " \t'Don', 'Dr', 'Major', 'Rev', 'Sir', 'Jonkheer', 'Dona'], 'Rare')\n",
        "  dataset['Title'] = dataset['Title'].replace('Mlle', 'Miss')\n",
        "  dataset['Title'] = dataset['Title'].replace('Ms', 'Miss')\n",
        "  dataset['Title'] = dataset['Title'].replace('Mme', 'Mrs')\n",
        "\n",
        "train_df[[\"Title\", \"Survived\"]].groupby([\"Title\"], as_index=False).mean()"
      ],
      "execution_count": 156,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Title</th>\n",
              "      <th>Survived</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Master</td>\n",
              "      <td>0.575000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Miss</td>\n",
              "      <td>0.702703</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Mr</td>\n",
              "      <td>0.156673</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Mrs</td>\n",
              "      <td>0.793651</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Rare</td>\n",
              "      <td>0.347826</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "    Title  Survived\n",
              "0  Master  0.575000\n",
              "1    Miss  0.702703\n",
              "2      Mr  0.156673\n",
              "3     Mrs  0.793651\n",
              "4    Rare  0.347826"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 156
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "iJ4R3EVrUsW5",
        "colab_type": "text"
      },
      "source": [
        "我们应该把类别替换成数字"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "oJpLUciWU2su",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 223
        },
        "outputId": "69256a43-ed4e-4369-d74b-a302f995040e"
      },
      "source": [
        "title_mapping = {\"Mr\": 1, \"Miss\": 2, \"Mrs\": 3, \"Master\": 4, \"Rare\": 5}\n",
        "\n",
        "for dataset in combine:\n",
        "    dataset['Title'] = dataset['Title'].map(title_mapping)\n",
        "    # dataset['Title'] = dataset['Title'].fillna(0)\n",
        "\n",
        "train_df.head()"
      ],
      "execution_count": 157,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>PassengerId</th>\n",
              "      <th>Survived</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Name</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Age</th>\n",
              "      <th>SibSp</th>\n",
              "      <th>Parch</th>\n",
              "      <th>Fare</th>\n",
              "      <th>Embarked</th>\n",
              "      <th>Title</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>Braund, Mr. Owen Harris</td>\n",
              "      <td>male</td>\n",
              "      <td>22.0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>7.2500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>Cumings, Mrs. John Bradley (Florence Briggs Th...</td>\n",
              "      <td>female</td>\n",
              "      <td>38.0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>71.2833</td>\n",
              "      <td>C</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>Heikkinen, Miss. Laina</td>\n",
              "      <td>female</td>\n",
              "      <td>26.0</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>7.9250</td>\n",
              "      <td>S</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>4</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>Futrelle, Mrs. Jacques Heath (Lily May Peel)</td>\n",
              "      <td>female</td>\n",
              "      <td>35.0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>53.1000</td>\n",
              "      <td>S</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>5</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>Allen, Mr. William Henry</td>\n",
              "      <td>male</td>\n",
              "      <td>35.0</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>8.0500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   PassengerId  Survived  Pclass  ...     Fare Embarked  Title\n",
              "0            1         0       3  ...   7.2500        S      1\n",
              "1            2         1       1  ...  71.2833        C      3\n",
              "2            3         1       3  ...   7.9250        S      2\n",
              "3            4         1       1  ...  53.1000        S      3\n",
              "4            5         0       3  ...   8.0500        S      1\n",
              "\n",
              "[5 rows x 11 columns]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 157
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "0Ll2WEp7V3oP",
        "colab_type": "text"
      },
      "source": [
        "现在从name中找到了与生存更相关的title，name可以删除掉了"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "SnEkhJK2WELe",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "outputId": "bff6563e-0039-4720-e643-f31b0d198176"
      },
      "source": [
        "train_df = train_df.drop(['Name', 'PassengerId'], axis=1)\n",
        "test_df = test_df.drop(['Name'], axis=1)\n",
        "combine = [train_df, test_df]\n",
        "train_df.shape, test_df.shape"
      ],
      "execution_count": 160,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "((891, 9), (418, 9))"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 160
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "OX6wK7rkXieT",
        "colab_type": "text"
      },
      "source": [
        "现在将字符串特征转换为数值"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "6Q1BOKmDXmEB",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "e327e686-7f20-49c4-a2a3-510055be1ec0"
      },
      "source": [
        "for dataset in combine:\n",
        "    dataset['Sex'] = dataset['Sex'].map({'female': 1, 'male': 0} ).astype(int)\n",
        "\n",
        "train_df.head()"
      ],
      "execution_count": 161,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Survived</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Age</th>\n",
              "      <th>SibSp</th>\n",
              "      <th>Parch</th>\n",
              "      <th>Fare</th>\n",
              "      <th>Embarked</th>\n",
              "      <th>Title</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>22.0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>7.2500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>38.0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>71.2833</td>\n",
              "      <td>C</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>26.0</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>7.9250</td>\n",
              "      <td>S</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>35.0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>53.1000</td>\n",
              "      <td>S</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>35.0</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>8.0500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   Survived  Pclass  Sex   Age  SibSp  Parch     Fare Embarked  Title\n",
              "0         0       3    0  22.0      1      0   7.2500        S      1\n",
              "1         1       1    1  38.0      1      0  71.2833        C      3\n",
              "2         1       3    1  26.0      0      0   7.9250        S      2\n",
              "3         1       1    1  35.0      1      0  53.1000        S      3\n",
              "4         0       3    0  35.0      0      0   8.0500        S      1"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 161
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "a6rxv-QZX2Fw",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.3 填充缺失值和空值"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "TLy0F9vuYMoP",
        "colab_type": "text"
      },
      "source": [
        "首先为age执行通常遇到缺值的情况，我们会有几种常见的处理方式\n",
        "\n",
        "- 如果缺值的样本占总数比例极高，我们可能就直接舍弃了，作为特征加入的话，可能反倒带入noise，影响最后的结果了.如cabin\n",
        "- 如果缺值的样本适中，而该属性非连续值特征属性(比如说类目属性)，那就把NaN作为一个新类别，加到类别特征中\n",
        "- 如果缺值的样本适中，而该属性为连续值特征属性，有时候我们会考虑给定一个step，然后把它离散化，之后把NaN作为一个type加到属性类目中。\n",
        "- 有些情况下，缺失的值个数并不是特别多，那我们也可以试着根据已有的值，拟合一下数据，补充上。\n",
        "- 本例中，后两种处理方式应该都是可行的，我们先试试拟合补全吧(虽然说没有特别多的背景可供我们拟合，这不一定是一个多么好的选择)本例使用Age，Gender和Pclass之间的相关性填补age\n"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "N0rYs849X6iw",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "4c089f54-9f55-48e6-f965-117b38b9fc7d"
      },
      "source": [
        "guess_ages = np.zeros((2,3))\n",
        "\n",
        "for dataset in combine:\n",
        "    for i in range(0, 2):\n",
        "        for j in range(0, 3):\n",
        "            guess_df = dataset[(dataset['Sex'] == i) & \\\n",
        "                                  (dataset['Pclass'] == j+1)]['Age'].dropna()\n",
        "\n",
        "            # age_mean = guess_df.mean()\n",
        "            # age_std = guess_df.std()\n",
        "            # age_guess = rnd.uniform(age_mean - age_std, age_mean + age_std)\n",
        "\n",
        "            age_guess = guess_df.median()\n",
        "\n",
        "            # Convert random age float to nearest .5 age\n",
        "            guess_ages[i,j] = int( age_guess/0.5 + 0.5 ) * 0.5\n",
        "            \n",
        "    for i in range(0, 2):\n",
        "        for j in range(0, 3):\n",
        "            dataset.loc[ (dataset.Age.isnull()) & (dataset.Sex == i) & (dataset.Pclass == j+1),\\\n",
        "                    'Age'] = guess_ages[i,j]\n",
        "\n",
        "    dataset['Age'] = dataset['Age'].astype(int)\n",
        "\n",
        "train_df.head()"
      ],
      "execution_count": 162,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Survived</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Age</th>\n",
              "      <th>SibSp</th>\n",
              "      <th>Parch</th>\n",
              "      <th>Fare</th>\n",
              "      <th>Embarked</th>\n",
              "      <th>Title</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>22</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>7.2500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>38</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>71.2833</td>\n",
              "      <td>C</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>26</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>7.9250</td>\n",
              "      <td>S</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>35</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>53.1000</td>\n",
              "      <td>S</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>35</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>8.0500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   Survived  Pclass  Sex  Age  SibSp  Parch     Fare Embarked  Title\n",
              "0         0       3    0   22      1      0   7.2500        S      1\n",
              "1         1       1    1   38      1      0  71.2833        C      3\n",
              "2         1       3    1   26      0      0   7.9250        S      2\n",
              "3         1       1    1   35      1      0  53.1000        S      3\n",
              "4         0       3    0   35      0      0   8.0500        S      1"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 162
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6U3VqGV0hTGo",
        "colab_type": "text"
      },
      "source": [
        "下面将age离散化吧"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "wmt7Bdq7hVno",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "7b2a0abb-03b0-4826-bfa6-3ee7f2b4ed0c"
      },
      "source": [
        "train_df[\"AgeBand\"] = pd.cut(train_df[\"Age\"], 5)\n",
        "train_df[[\"AgeBand\", \"Survived\"]].groupby(\"AgeBand\", as_index=False).mean().sort_values(by=\"AgeBand\")"
      ],
      "execution_count": 167,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>AgeBand</th>\n",
              "      <th>Survived</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>(-0.08, 16.0]</td>\n",
              "      <td>0.550000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>(16.0, 32.0]</td>\n",
              "      <td>0.337374</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>(32.0, 48.0]</td>\n",
              "      <td>0.412037</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>(48.0, 64.0]</td>\n",
              "      <td>0.434783</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>(64.0, 80.0]</td>\n",
              "      <td>0.090909</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "         AgeBand  Survived\n",
              "0  (-0.08, 16.0]  0.550000\n",
              "1   (16.0, 32.0]  0.337374\n",
              "2   (32.0, 48.0]  0.412037\n",
              "3   (48.0, 64.0]  0.434783\n",
              "4   (64.0, 80.0]  0.090909"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 167
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "iuk-1u-kiiev",
        "colab_type": "text"
      },
      "source": [
        "下面用数字把区间换掉"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "REOOIfsbj60T",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "997fe9ac-99fd-4020-cc1e-4c9b318f1b67"
      },
      "source": [
        "for dataset in combine:    \n",
        "    dataset.loc[dataset['Age'] <= 16, 'Age'] = 0 \n",
        "    #关于loc的用法：[[\"one\", \"two\"]]是取\"one\"\"two\"两行，[\"one\", \"two\"]是取\"one\"行，\"two\"列\n",
        "    dataset.loc[(dataset['Age'] > 16) & (dataset['Age'] <= 32), 'Age'] = 1\n",
        "    dataset.loc[(dataset['Age'] > 32) & (dataset['Age'] <= 48), 'Age'] = 2\n",
        "    dataset.loc[(dataset['Age'] > 48) & (dataset['Age'] <= 64), 'Age'] = 3\n",
        "    dataset.loc[ dataset['Age'] > 64, 'Age']\n",
        "train_df.head()"
      ],
      "execution_count": 179,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Survived</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Age</th>\n",
              "      <th>SibSp</th>\n",
              "      <th>Parch</th>\n",
              "      <th>Fare</th>\n",
              "      <th>Embarked</th>\n",
              "      <th>Title</th>\n",
              "      <th>AgeBand</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>7.2500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "      <td>(16.0, 32.0]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>71.2833</td>\n",
              "      <td>C</td>\n",
              "      <td>3</td>\n",
              "      <td>(32.0, 48.0]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>7.9250</td>\n",
              "      <td>S</td>\n",
              "      <td>2</td>\n",
              "      <td>(16.0, 32.0]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>53.1000</td>\n",
              "      <td>S</td>\n",
              "      <td>3</td>\n",
              "      <td>(32.0, 48.0]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>8.0500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "      <td>(32.0, 48.0]</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   Survived  Pclass  Sex  Age  ...     Fare  Embarked  Title       AgeBand\n",
              "0         0       3    0    1  ...   7.2500         S      1  (16.0, 32.0]\n",
              "1         1       1    1    2  ...  71.2833         C      3  (32.0, 48.0]\n",
              "2         1       3    1    1  ...   7.9250         S      2  (16.0, 32.0]\n",
              "3         1       1    1    2  ...  53.1000         S      3  (32.0, 48.0]\n",
              "4         0       3    0    2  ...   8.0500         S      1  (32.0, 48.0]\n",
              "\n",
              "[5 rows x 10 columns]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 179
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "NzOraVX0ncSm",
        "colab_type": "text"
      },
      "source": [
        "AgeBand已经没用了（作用是提供了怎样划分区间，以及指导该划分区间的方式与生存有没有相关性），可以删除了"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "rkBCdl2wn7r5",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "d0b4e4ac-69bf-4ee6-cb05-ef203b65e907"
      },
      "source": [
        "train_df = train_df.drop(['AgeBand'], axis=1)\n",
        "combine = [train_df, test_df]\n",
        "train_df.head()"
      ],
      "execution_count": 181,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Survived</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Age</th>\n",
              "      <th>SibSp</th>\n",
              "      <th>Parch</th>\n",
              "      <th>Fare</th>\n",
              "      <th>Embarked</th>\n",
              "      <th>Title</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>7.2500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>71.2833</td>\n",
              "      <td>C</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>7.9250</td>\n",
              "      <td>S</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>53.1000</td>\n",
              "      <td>S</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>8.0500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   Survived  Pclass  Sex  Age  SibSp  Parch     Fare Embarked  Title\n",
              "0         0       3    0    1      1      0   7.2500        S      1\n",
              "1         1       1    1    2      1      0  71.2833        C      3\n",
              "2         1       3    1    1      0      0   7.9250        S      2\n",
              "3         1       1    1    2      1      0  53.1000        S      3\n",
              "4         0       3    0    2      0      0   8.0500        S      1"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 181
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "qkne58IWoBv0",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.4 从已有特征中创建新特征（不同于2.3.2）\n",
        "我们可以结合Parch和SibSp，创建一个新特征FamilySize"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "joqBilhloeQa",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 331
        },
        "outputId": "051daed3-baa8-4d74-ce3f-bcc816580c3d"
      },
      "source": [
        "for dataset in combine:\n",
        "  dataset[\"FamilySize\"] = dataset[\"Parch\"] + dataset[\"SibSp\"] + 1\n",
        "\n",
        "train_df[['FamilySize', 'Survived']].groupby(['FamilySize'], as_index=False).mean().sort_values(by='Survived', ascending=False)"
      ],
      "execution_count": 187,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>FamilySize</th>\n",
              "      <th>Survived</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>4</td>\n",
              "      <td>0.724138</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>3</td>\n",
              "      <td>0.578431</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>2</td>\n",
              "      <td>0.552795</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>7</td>\n",
              "      <td>0.333333</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>1</td>\n",
              "      <td>0.303538</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>5</td>\n",
              "      <td>0.200000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>6</td>\n",
              "      <td>0.136364</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>8</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>11</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   FamilySize  Survived\n",
              "3           4  0.724138\n",
              "2           3  0.578431\n",
              "1           2  0.552795\n",
              "6           7  0.333333\n",
              "0           1  0.303538\n",
              "4           5  0.200000\n",
              "5           6  0.136364\n",
              "7           8  0.000000\n",
              "8          11  0.000000"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 187
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "iSVT_7dhpp7E",
        "colab_type": "text"
      },
      "source": [
        "我们还可以创建一个新的特征isalone"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "W1Uq_eESp2ES",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 112
        },
        "outputId": "7a5d53cb-6bad-4a59-9303-f4d87523a731"
      },
      "source": [
        "for dataset in combine:\n",
        "    dataset['IsAlone'] = 0\n",
        "    dataset.loc[dataset['FamilySize'] == 1, 'IsAlone'] = 1\n",
        "\n",
        "train_df[['IsAlone', 'Survived']].groupby(['IsAlone'], as_index=False).mean()"
      ],
      "execution_count": 188,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>IsAlone</th>\n",
              "      <th>Survived</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>0.505650</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1</td>\n",
              "      <td>0.303538</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   IsAlone  Survived\n",
              "0        0  0.505650\n",
              "1        1  0.303538"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 188
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "e5PesDpnqBg8",
        "colab_type": "text"
      },
      "source": [
        "放弃Parch，SibSp和FamilySize特征，转而使用IsAlone。（舍弃FamilySize是因为它没有太大规律性）"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "c3UdYk_aqRNR",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "ca5c24f2-ee3f-455f-8bf3-577386f551c4"
      },
      "source": [
        "train_df = train_df.drop(['Parch', 'SibSp', 'FamilySize'], axis=1)\n",
        "test_df = test_df.drop(['Parch', 'SibSp', 'FamilySize'], axis=1)\n",
        "combine = [train_df, test_df]\n",
        "\n",
        "train_df.head()"
      ],
      "execution_count": 189,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Survived</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Age</th>\n",
              "      <th>Fare</th>\n",
              "      <th>Embarked</th>\n",
              "      <th>Title</th>\n",
              "      <th>IsAlone</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>7.2500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>71.2833</td>\n",
              "      <td>C</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>7.9250</td>\n",
              "      <td>S</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>53.1000</td>\n",
              "      <td>S</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "      <td>8.0500</td>\n",
              "      <td>S</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   Survived  Pclass  Sex  Age     Fare Embarked  Title  IsAlone\n",
              "0         0       3    0    1   7.2500        S      1        0\n",
              "1         1       1    1    2  71.2833        C      3        0\n",
              "2         1       3    1    1   7.9250        S      2        1\n",
              "3         1       1    1    2  53.1000        S      3        0\n",
              "4         0       3    0    2   8.0500        S      1        1"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 189
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "C_FSOzEcqXaJ",
        "colab_type": "text"
      },
      "source": [
        "我们还可以创建一个结合Pclass和Age的人工特征。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "uAGZYKm_qfjh",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 363
        },
        "outputId": "9632ea35-8928-4233-cdd7-de10f01e7a14"
      },
      "source": [
        "for dataset in combine:\n",
        "    dataset['Age*Class'] = dataset.Age * dataset.Pclass\n",
        "\n",
        "train_df.loc[:, ['Age*Class', 'Age', 'Pclass']].head(10)\n"
      ],
      "execution_count": 190,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Age*Class</th>\n",
              "      <th>Age</th>\n",
              "      <th>Pclass</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>2</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>2</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>6</td>\n",
              "      <td>2</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>3</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   Age*Class  Age  Pclass\n",
              "0          3    1       3\n",
              "1          2    2       1\n",
              "2          3    1       3\n",
              "3          2    2       1\n",
              "4          6    2       3\n",
              "5          3    1       3\n",
              "6          3    3       1\n",
              "7          0    0       3\n",
              "8          3    1       3\n",
              "9          0    0       2"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 190
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "9zkshYX4qhs8",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.5 处理类目特征"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "X26YXAhgqnY-",
        "colab_type": "text"
      },
      "source": [
        "Embarked（登录港口）：S, Q, C；\n",
        "\n",
        "首先出来它的缺失值，只有两个，可以用众数填充"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "1v4z7JU3rP6j",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "outputId": "be518da9-5d39-4ca0-ed0b-237f8d9e88cd"
      },
      "source": [
        "freq_port = train_df.Embarked.dropna().mode()[0] #mode是众数\n",
        "freq_port"
      ],
      "execution_count": 192,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "'S'"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 192
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "GZlu-TI4rbzb",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 143
        },
        "outputId": "53a40325-ce45-46d9-d7f3-6520fccc10e0"
      },
      "source": [
        "for dataset in combine:\n",
        "    dataset['Embarked'] = dataset['Embarked'].fillna(freq_port)\n",
        "\n",
        "train_df[['Embarked', 'Survived']].groupby(['Embarked'], as_index=False).mean().sort_values(by='Survived', ascending=False)"
      ],
      "execution_count": 193,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Embarked</th>\n",
              "      <th>Survived</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>C</td>\n",
              "      <td>0.553571</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Q</td>\n",
              "      <td>0.389610</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>S</td>\n",
              "      <td>0.339009</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "  Embarked  Survived\n",
              "0        C  0.553571\n",
              "1        Q  0.389610\n",
              "2        S  0.339009"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 193
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "UqVzO5nBr7Ds",
        "colab_type": "text"
      },
      "source": [
        "将类目特征也转成数字"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ORUhWU8Or81Q",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "98b7b312-e8c8-4694-caa9-2d9216fb8e91"
      },
      "source": [
        "for dataset in combine:\n",
        "    dataset['Embarked'] = dataset['Embarked'].map( {'S': 0, 'C': 1, 'Q': 2} ).astype(int)\n",
        "\n",
        "train_df.head()"
      ],
      "execution_count": 194,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Survived</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Age</th>\n",
              "      <th>Fare</th>\n",
              "      <th>Embarked</th>\n",
              "      <th>Title</th>\n",
              "      <th>IsAlone</th>\n",
              "      <th>Age*Class</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>7.2500</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>71.2833</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>7.9250</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>53.1000</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "      <td>8.0500</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>6</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   Survived  Pclass  Sex  Age     Fare  Embarked  Title  IsAlone  Age*Class\n",
              "0         0       3    0    1   7.2500         0      1        0          3\n",
              "1         1       1    1    2  71.2833         1      3        0          2\n",
              "2         1       3    1    1   7.9250         0      2        1          3\n",
              "3         1       1    1    2  53.1000         0      3        0          2\n",
              "4         0       3    0    2   8.0500         0      1        1          6"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 194
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "W_BNTDVtsco7",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.6 填充转换数字特征\n",
        "fare(只有测试集有两个缺失值)"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Rh2MzRGEs539",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "9f7ec902-f006-4a95-daf9-90e4d09a05f1"
      },
      "source": [
        "test_df['Fare'].fillna(test_df['Fare'].dropna().median(), inplace=True)\n",
        "test_df.head()"
      ],
      "execution_count": 195,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>PassengerId</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Age</th>\n",
              "      <th>Fare</th>\n",
              "      <th>Embarked</th>\n",
              "      <th>Title</th>\n",
              "      <th>IsAlone</th>\n",
              "      <th>Age*Class</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>892</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "      <td>7.8292</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>6</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>893</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>7.0000</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>6</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>894</td>\n",
              "      <td>2</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>9.6875</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>6</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>895</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>8.6625</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>896</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>12.2875</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   PassengerId  Pclass  Sex  Age     Fare  Embarked  Title  IsAlone  Age*Class\n",
              "0          892       3    0    2   7.8292         2      1        1          6\n",
              "1          893       3    1    2   7.0000         0      3        0          6\n",
              "2          894       2    0    3   9.6875         2      1        1          6\n",
              "3          895       3    0    1   8.6625         0      1        1          3\n",
              "4          896       3    1    1  12.2875         0      3        0          3"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 195
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Cwdxx9I0tWX6",
        "colab_type": "text"
      },
      "source": [
        "还可以创建FareBand"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "M0a6XddWttUj",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "e12fc0be-e515-4f51-ecf4-1bae5a5fb4c0"
      },
      "source": [
        "train_df[\"FareBand\"] = pd.qcut(train_df[\"Fare\"], 5)\n",
        "train_df[['FareBand', 'Survived']].groupby(['FareBand'], as_index=False).mean().sort_values(by='FareBand', ascending=True)"
      ],
      "execution_count": 198,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>FareBand</th>\n",
              "      <th>Survived</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>(-0.001, 7.854]</td>\n",
              "      <td>0.217877</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>(7.854, 10.5]</td>\n",
              "      <td>0.201087</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>(10.5, 21.679]</td>\n",
              "      <td>0.424419</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>(21.679, 39.688]</td>\n",
              "      <td>0.444444</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>(39.688, 512.329]</td>\n",
              "      <td>0.642045</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "            FareBand  Survived\n",
              "0    (-0.001, 7.854]  0.217877\n",
              "1      (7.854, 10.5]  0.201087\n",
              "2     (10.5, 21.679]  0.424419\n",
              "3   (21.679, 39.688]  0.444444\n",
              "4  (39.688, 512.329]  0.642045"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 198
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "RaaHAH7UuQqL",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 363
        },
        "outputId": "60c514c8-6c5d-479d-a910-94d3714e165a"
      },
      "source": [
        "for dataset in combine:\n",
        "    dataset.loc[ dataset['Fare'] <= 7.91, 'Fare'] = 0\n",
        "    dataset.loc[(dataset['Fare'] > 7.91) & (dataset['Fare'] <= 14.454), 'Fare'] = 1\n",
        "    dataset.loc[(dataset['Fare'] > 14.454) & (dataset['Fare'] <= 31), 'Fare']   = 2\n",
        "    dataset.loc[ dataset['Fare'] > 31, 'Fare'] = 3\n",
        "    dataset['Fare'] = dataset['Fare'].astype(int)\n",
        "\n",
        "train_df = train_df.drop(['FareBand'], axis=1)\n",
        "combine = [train_df, test_df]\n",
        "    \n",
        "train_df.head(10)"
      ],
      "execution_count": 199,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Survived</th>\n",
              "      <th>Pclass</th>\n",
              "      <th>Sex</th>\n",
              "      <th>Age</th>\n",
              "      <th>Fare</th>\n",
              "      <th>Embarked</th>\n",
              "      <th>Title</th>\n",
              "      <th>IsAlone</th>\n",
              "      <th>Age*Class</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>6</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "      <td>0</td>\n",
              "      <td>4</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>1</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>2</td>\n",
              "      <td>1</td>\n",
              "      <td>3</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   Survived  Pclass  Sex  Age  Fare  Embarked  Title  IsAlone  Age*Class\n",
              "0         0       3    0    1     0         0      1        0          3\n",
              "1         1       1    1    2     3         1      3        0          2\n",
              "2         1       3    1    1     1         0      2        1          3\n",
              "3         1       1    1    2     3         0      3        0          2\n",
              "4         0       3    0    2     1         0      1        1          6\n",
              "5         0       3    0    1     1         2      1        1          3\n",
              "6         0       1    0    3     3         0      1        1          3\n",
              "7         0       3    0    0     2         0      4        0          0\n",
              "8         1       3    1    1     1         0      3        0          3\n",
              "9         1       2    1    0     2         1      3        0          0"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 199
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Pp6qtxXyuk4Q",
        "colab_type": "text"
      },
      "source": [
        "### 2.3 模型和预测"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ysdnr14xu3Ki",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "outputId": "4256967d-12dc-42a7-dec0-883cd0c8a39c"
      },
      "source": [
        "X_train = train_df.drop(\"Survived\", axis=1)\n",
        "Y_train = train_df[\"Survived\"]\n",
        "X_test  = test_df.drop(\"PassengerId\", axis=1).copy()\n",
        "X_train.shape, Y_train.shape, X_test.shape"
      ],
      "execution_count": 202,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "((891, 8), (891,), (418, 8))"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 202
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "z9SWwRq9vbHb",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.1 逻辑回归（Logistic Regression）\n",
        "逻辑回归是可以用于分类的。通常用于估计一个实例属于某个特定类别的概率。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "YDXL0jbBvqOQ",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 92
        },
        "outputId": "973ca742-aab0-4fd5-f85d-77af6868bf4e"
      },
      "source": [
        "from sklearn.linear_model import LogisticRegression\n",
        "\n",
        "log_reg = LogisticRegression()\n",
        "log_reg.fit(X_train, Y_train)\n",
        "Y_pred = log_reg.predict(X_test)\n",
        "acc_log = round(log_reg.score(X_train, Y_train) * 100, 2)\n",
        "acc_log"
      ],
      "execution_count": 203,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.6/dist-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n",
            "  FutureWarning)\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "80.36"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 203
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "5LFkSQHrxhb_",
        "colab_type": "text"
      },
      "source": [
        "我们可以使用Logistic回归来验证我们对功能创建和完成目标的假设和决策。这可以通过计算决策函数中的特征的系数来完成。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "5Wu2JsnSxiOV",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 300
        },
        "outputId": "e4046ee1-5dc3-4e61-8387-7f8c38ebcee6"
      },
      "source": [
        "coeff_df = pd.DataFrame(train_df.columns.delete(0), columns=[\"Feature\"])\n",
        "coeff_df[\"Correlation\"] = pd.Series(log_reg.coef_[0])\n",
        "coeff_df.sort_values(by='Correlation', ascending=False)\n"
      ],
      "execution_count": 218,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Feature</th>\n",
              "      <th>Correlation</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Sex</td>\n",
              "      <td>2.201527</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>Title</td>\n",
              "      <td>0.398234</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Age</td>\n",
              "      <td>0.287164</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Embarked</td>\n",
              "      <td>0.261762</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>IsAlone</td>\n",
              "      <td>0.129140</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Fare</td>\n",
              "      <td>-0.085150</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>Age*Class</td>\n",
              "      <td>-0.311199</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Pclass</td>\n",
              "      <td>-0.749006</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "     Feature  Correlation\n",
              "1        Sex     2.201527\n",
              "5      Title     0.398234\n",
              "2        Age     0.287164\n",
              "4   Embarked     0.261762\n",
              "6    IsAlone     0.129140\n",
              "3       Fare    -0.085150\n",
              "7  Age*Class    -0.311199\n",
              "0     Pclass    -0.749006"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 218
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6hDImUmGzHQ3",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.2 支持向量机（SVM）"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "s5G0axqSzNZ6",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 92
        },
        "outputId": "3163c474-b626-4b5a-97d3-60a401110e78"
      },
      "source": [
        "from sklearn.svm import SVC\n",
        "\n",
        "svc = SVC()\n",
        "svc.fit(X_train, Y_train)\n",
        "Y_pred = svc.predict(X_test)\n",
        "acc_svc = round(svc.score(X_train, Y_train) * 100, 2)\n",
        "acc_svc"
      ],
      "execution_count": 223,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.6/dist-packages/sklearn/svm/base.py:193: FutureWarning: The default value of gamma will change from 'auto' to 'scale' in version 0.22 to account better for unscaled features. Set gamma explicitly to 'auto' or 'scale' to avoid this warning.\n",
            "  \"avoid this warning.\", FutureWarning)\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "83.84"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 223
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "tg5uTkXd4Ljl",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.3 k近邻（k-Nearest Neighbors）\n",
        "k-Nearest Neighbors算法（或简称k-NN）是用于分类和回归的非参数方法。样本按其邻居的多数票进行分类，样本被分配给其k个最近邻居中最常见的类（k是正整数，通常很小）。如果k = 1，则简单地将对象分配给该单个最近邻居的类"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ODh1XPR84art",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "outputId": "96803741-5a77-4701-ab45-6e9c99db2b43"
      },
      "source": [
        "from sklearn.neighbors import KNeighborsClassifier\n",
        "\n",
        "knn = KNeighborsClassifier(n_neighbors = 3)\n",
        "knn.fit(X_train, Y_train)\n",
        "Y_pred = knn.predict(X_test)\n",
        "acc_knn = round(knn.score(X_train, Y_train) * 100, 2)\n",
        "acc_knn"
      ],
      "execution_count": 225,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "84.74"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 225
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "iQ06INcb4vy8",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.4 高斯朴素贝叶斯（Gaussian Naive Bayes）\n",
        "朴素贝叶斯分类器是一系列简单的概率分类器"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "kCmiv5bZ5FEc",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "outputId": "3fcb5c6a-06d8-48cc-db8c-4fde1a1a7263"
      },
      "source": [
        "from sklearn.naive_bayes import GaussianNB\n",
        "\n",
        "gaussian = GaussianNB()\n",
        "gaussian.fit(X_train, Y_train)\n",
        "Y_pred = gaussian.predict(X_test)\n",
        "acc_gaussian = round(gaussian.score(X_train, Y_train) * 100, 2)\n",
        "acc_gaussian"
      ],
      "execution_count": 226,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "72.28"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 226
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "pR1zOF4z5S4u",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.5 感知器（Perceptron）\n",
        "是用于二元分类器的监督学习的算法，可以决定由数字向量表示的输入是否属于某个特定类的函数"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Hy9lAf-q6Srs",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "outputId": "b92961a0-98b9-4146-c047-83084683183c"
      },
      "source": [
        "from sklearn.linear_model import Perceptron\n",
        "\n",
        "perceptron = Perceptron()\n",
        "perceptron.fit(X_train, Y_train)\n",
        "Y_pred = perceptron.predict(X_test)\n",
        "acc_perceptron = round(perceptron.score(X_train, Y_train) * 100, 2)\n",
        "acc_perceptron"
      ],
      "execution_count": 227,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "78.34"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 227
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "yvl6g7uv6m0P",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.6 线性SVC\n"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "MRGq3W-66tzy",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 92
        },
        "outputId": "13126d9b-ceb2-41c0-a646-52e311729b26"
      },
      "source": [
        "from sklearn.svm import LinearSVC\n",
        "\n",
        "linear_svc = LinearSVC()\n",
        "linear_svc.fit(X_train, Y_train)\n",
        "Y_pred = linear_svc.predict(X_test)\n",
        "acc_linear_svc = round(linear_svc.score(X_train, Y_train) * 100, 2)\n",
        "acc_linear_svc"
      ],
      "execution_count": 228,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.6/dist-packages/sklearn/svm/base.py:929: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.\n",
            "  \"the number of iterations.\", ConvergenceWarning)\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "78.56"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 228
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "O-JdBVpg669m",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.7 随机梯度下降(Stochastic Gradient Descent)"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "h8KdTz9U7QEp",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "outputId": "06dd123c-e2d0-47f1-8044-19f09be1cc89"
      },
      "source": [
        "from sklearn.linear_model import SGDClassifier\n",
        "\n",
        "sgd = SGDClassifier()\n",
        "sgd.fit(X_train, Y_train)\n",
        "Y_pred = sgd.predict(X_test)\n",
        "acc_sgd = round(sgd.score(X_train, Y_train) * 100, 2)\n",
        "acc_sgd"
      ],
      "execution_count": 229,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "76.21"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 229
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "CKbY9UKP7VQ2",
        "colab_type": "text"
      },
      "source": [
        "#### 决策树（Decision Tree）\n"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "WOkC9huH7gIw",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "outputId": "5ec3cb57-3c5f-46ea-d9df-13d2cf969584"
      },
      "source": [
        "from sklearn.tree import DecisionTreeClassifier\n",
        "\n",
        "decision_tree = DecisionTreeClassifier()\n",
        "decision_tree.fit(X_train, Y_train)\n",
        "Y_pred = decision_tree.predict(X_test)\n",
        "acc_decision_tree = round(decision_tree.score(X_train, Y_train) * 100, 2)\n",
        "acc_decision_tree"
      ],
      "execution_count": 230,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "86.76"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 230
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "aLb4PfOw7ldb",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.8 随机森林\n"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "UrEu3QNu7nDK",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        },
        "outputId": "14976986-748b-42b6-f849-606ba2a4132d"
      },
      "source": [
        "from sklearn.ensemble import RandomForestClassifier\n",
        "\n",
        "random_forest = RandomForestClassifier(n_estimators=100)\n",
        "random_forest.fit(X_train, Y_train)\n",
        "Y_pred = random_forest.predict(X_test)\n",
        "random_forest.score(X_train, Y_train)\n",
        "acc_random_forest = round(random_forest.score(X_train, Y_train) * 100, 2)\n",
        "acc_random_forest"
      ],
      "execution_count": 249,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "86.76"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 249
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8b7Nq_WK7zvt",
        "colab_type": "text"
      },
      "source": [
        "#### 2.3.9 模型评估\n",
        "我们现在可以对所有模型进行评估，以便为我们的问题选择最佳模型。虽然决策树和随机森林得分相同，但我们选择使用随机森林来纠正决策树过度拟合其训练集的习惯"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "B6nCDsmy75rv",
        "colab_type": "code",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 331
        },
        "outputId": "f16ca92c-8809-4418-af5d-018ff3433208"
      },
      "source": [
        "models = pd.DataFrame({\n",
        "    'Model': ['Support Vector Machines', 'KNN', 'Logistic Regression', \n",
        "              'Random Forest', 'Naive Bayes', 'Perceptron', \n",
        "              'Stochastic Gradient Decent', 'Linear SVC', \n",
        "              'Decision Tree'],\n",
        "    'Score': [acc_svc, acc_knn, acc_log, \n",
        "              acc_random_forest, acc_gaussian, acc_perceptron, \n",
        "              acc_sgd, acc_linear_svc, acc_decision_tree]})\n",
        "models.sort_values(by=\"Score\", ascending=False)"
      ],
      "execution_count": 248,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Model</th>\n",
              "      <th>Score</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Random Forest</td>\n",
              "      <td>86.76</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>Decision Tree</td>\n",
              "      <td>86.76</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>KNN</td>\n",
              "      <td>84.74</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Support Vector Machines</td>\n",
              "      <td>83.84</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>Logistic Regression</td>\n",
              "      <td>80.36</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>Linear SVC</td>\n",
              "      <td>78.56</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>Perceptron</td>\n",
              "      <td>78.34</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>Stochastic Gradient Decent</td>\n",
              "      <td>76.21</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Naive Bayes</td>\n",
              "      <td>72.28</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "                        Model  Score\n",
              "3               Random Forest  86.76\n",
              "8               Decision Tree  86.76\n",
              "1                         KNN  84.74\n",
              "0     Support Vector Machines  83.84\n",
              "2         Logistic Regression  80.36\n",
              "7                  Linear SVC  78.56\n",
              "5                  Perceptron  78.34\n",
              "6  Stochastic Gradient Decent  76.21\n",
              "4                 Naive Bayes  72.28"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 248
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "PcRC4zXW8wF6",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "submission = pd.DataFrame({\n",
        "        \"PassengerId\": test_df[\"PassengerId\"],\n",
        "        \"Survived\": Y_pred\n",
        "    })\n",
        "\n",
        "submission.to_csv('submission.csv', index=False)"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "GdVI9ZuU-AwX",
        "colab_type": "text"
      },
      "source": [
        "这个在kaggle分数是0.78468。分数不高。我也是做完才知道emem。。。\n",
        "\n",
        "必然如此，使用的这些模型，全部都没有调参，全部用的默认的参数。也没有使用集成方法（随机森林除外）"
      ]
    }
  ]
}